﻿ try
        {
        if (document.getElementById("ctl00_ContentPlaceHolder3_txtObjectSearch")!=null)
            {
                document.getElementById("ctl00_ContentPlaceHolder3_txtObjectSearch").focus();
            }
            }
            catch(ExFocusSearch){}
            
            
        function UltraWebTreeAsyncHolder_InitializePanel(oPanel){ //Added By Dhanapal For WebAsync Refresh Panel
        //alert("testing");
        var progress = oPanel.getProgressIndicator();
        progress.setImageUrl("Images/load.gif");
        }
        //show ViewAll Link On Filter Mode
        if (document.getElementById('ctl00_ContentPlaceHolder3_lblListHeader')!=null)
        {
            if (document.getElementById('ctl00_ContentPlaceHolder3_lblListHeader').innerHTML.length<1)
            {
                if (window.location.href.toLowerCase().indexOf('flmode=1')>0)
                {
                    document.getElementById('ctl00_ContentPlaceHolder3_lblListHeader').innerHTML = "Filtered view. Click <a href='#' onclick='javascript:mb_loadViewAllUrl();return false;'>here</a> to view all records.";
                }
            }
        }
        mb_disableFilterInvokeButton();
  

//code added for IPP changes
$(document).ready(function() {
    if (document.getElementById("ctl00_hfsourceapp")!=null)
    {
        var hfsrcapp = document.getElementById("ctl00_hfsourceapp").value;
        if (hfsrcapp.toLowerCase().indexOf("ipp") > -1) 
        {
            var url1 = window.location.href;
            if (url1.indexOf("pgs_id=7774616db93f6bca") > -1 || url1.indexOf("pgs_id=8c2cb032c3b3516d") > -1)
            {                
                if (document.getElementById("ctl00_ContentPlaceHolder3_btnAddNewTop") != null)
                    document.getElementById("ctl00_ContentPlaceHolder3_btnAddNewTop").style.display = "none";
                
                if (document.getElementById("ctl00_ContentPlaceHolder3_btnAddNew") != null)
                    document.getElementById("ctl00_ContentPlaceHolder3_btnAddNew").style.display = "none";
                
                if (document.getElementById("ctl00_ContentPlaceHolder3_imgHelp") != null)
                    document.getElementById("ctl00_ContentPlaceHolder3_imgHelp").style.display = "none";
            }

            if (url1.indexOf("pgs_id=7774616db93f6bca") > -1)
            {
                $("a[href$='&action=1']")
                   .each(function()
                   { 
                      if ($(this).text() == "Notify this Rep")
                      {
                          $(this).parent().parent().hide();
                      }
                   });
            }       
        }
     }
});